//
// MimeMapping.cs
//
// Author: najmeddine nouri
//
// Copyright (c) 2013 najmeddine nouri, amine gassem
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// Except as contained in this notice, the name(s) of the above copyright holders
// shall not be used in advertising or otherwise to promote the sale, use or other
// dealings in this Software without prior written authorization.
//
﻿using System;
using System.Collections.Generic;

namespace Badr.Server
{
    /// <summary>
    /// Maps resource extensions to content MIME types.
    /// </summary>
    public sealed class MimeMapping
    {
        /// <summary>
        /// Gets the MIME type for the given resource path
        /// </summary>
        /// <returns>
        /// The MIME type if found otherwise "text/plain".
        /// </returns>
        /// <param name='resourcepath'>
        /// Resource path.
        /// </param>
        public static string GetMimeMapping(string resourcepath)
        {
            if (resourcepath != null)
                return GetMimeMappingByExtension(System.IO.Path.GetExtension(resourcepath));

            return "text/plain";
        }

        /// <summary>
        /// Gets the MIME type mapped to the given file extension
        /// </summary>
        /// <param name="fileExtension">file extension</param>
        /// <returns>The MIME type if found otherwise "text/plain".</returns>
        public static string GetMimeMappingByExtension(string fileExtension)
        {
            if (fileExtension != null)
            {
                fileExtension = fileExtension.TrimStart('.');
                if (_dict.ContainsKey(fileExtension))
                    return _dict[fileExtension];
            }

            return "text/plain";
        }

        private static Dictionary<string, string> _dict;
        static MimeMapping()
        {
            _dict = new Dictionary<string, string>();
            try
            {
                _dict.Add("123", "application/vnd.lotus-1-2-3");
                _dict.Add("3dml", "text/vnd.in3d.3dml");
                _dict.Add("3ds", "image/x-3ds");
                _dict.Add("3g2", "video/3gpp2");
                _dict.Add("3gp", "video/3gpp");
                _dict.Add("7z", "application/x-7z-compressed");
                _dict.Add("aab", "application/x-authorware-bin");
                _dict.Add("aac", "audio/x-aac");
                _dict.Add("aam", "application/x-authorware-map");
                _dict.Add("aas", "application/x-authorware-seg");
                _dict.Add("abw", "application/x-abiword");
                _dict.Add("ac", "application/pkix-attr-cert");
                _dict.Add("acc", "application/vnd.americandynamics.acc");
                _dict.Add("ace", "application/x-ace-compressed");
                _dict.Add("acu", "application/vnd.acucobol");
                _dict.Add("acutc", "application/vnd.acucorp");
                _dict.Add("adp", "audio/adpcm");
                _dict.Add("aep", "application/vnd.audiograph");
                _dict.Add("afm", "application/x-font-type1");
                _dict.Add("afp", "application/vnd.ibm.modcap");
                _dict.Add("ahead", "application/vnd.ahead.space");
                _dict.Add("ai", "application/postscript");
                _dict.Add("aif", "audio/x-aiff");
                _dict.Add("aifc", "audio/x-aiff");
                _dict.Add("aiff", "audio/x-aiff");
                _dict.Add("air", "application/vnd.adobe.air-application-installer-package+zip");
                _dict.Add("ait", "application/vnd.dvb.ait");
                _dict.Add("ami", "application/vnd.amiga.ami");
                _dict.Add("apk", "application/vnd.android.package-archive");
                _dict.Add("appcache", "text/cache-manifest");
                _dict.Add("application", "application/x-ms-application");
                _dict.Add("apr", "application/vnd.lotus-approach");
                _dict.Add("arc", "application/x-freearc");
                _dict.Add("asc", "application/pgp-signature");
                _dict.Add("asf", "video/x-ms-asf");
                _dict.Add("asm", "text/x-asm");
                _dict.Add("aso", "application/vnd.accpac.simply.aso");
                _dict.Add("asx", "video/x-ms-asf");
                _dict.Add("atc", "application/vnd.acucorp");
                _dict.Add("atom", "application/atom+xml");
                _dict.Add("atomcat", "application/atomcat+xml");
                _dict.Add("atomsvc", "application/atomsvc+xml");
                _dict.Add("atx", "application/vnd.antix.game-component");
                _dict.Add("au", "audio/basic");
                _dict.Add("avi", "video/x-msvideo");
                _dict.Add("aw", "application/applixware");
                _dict.Add("azf", "application/vnd.airzip.filesecure.azf");
                _dict.Add("azs", "application/vnd.airzip.filesecure.azs");
                _dict.Add("azw", "application/vnd.amazon.ebook");
                _dict.Add("bat", "application/x-msdownload");
                _dict.Add("bcpio", "application/x-bcpio");
                _dict.Add("bdf", "application/x-font-bdf");
                _dict.Add("bdm", "application/vnd.syncml.dm+wbxml");
                _dict.Add("bed", "application/vnd.realvnc.bed");
                _dict.Add("bh2", "application/vnd.fujitsu.oasysprs");
                _dict.Add("bin", "application/octet-stream");
                _dict.Add("blb", "application/x-blorb");
                _dict.Add("blorb", "application/x-blorb");
                _dict.Add("bmi", "application/vnd.bmi");
                _dict.Add("bmp", "image/bmp");
                _dict.Add("book", "application/vnd.framemaker");
                _dict.Add("box", "application/vnd.previewsystems.box");
                _dict.Add("boz", "application/x-bzip2");
                _dict.Add("bpk", "application/octet-stream");
                _dict.Add("btif", "image/prs.btif");
                _dict.Add("bz", "application/x-bzip");
                _dict.Add("bz2", "application/x-bzip2");
                _dict.Add("c", "text/x-c");
                _dict.Add("c11amc", "application/vnd.cluetrust.cartomobile-config");
                _dict.Add("c11amz", "application/vnd.cluetrust.cartomobile-config-pkg");
                _dict.Add("c4d", "application/vnd.clonk.c4group");
                _dict.Add("c4f", "application/vnd.clonk.c4group");
                _dict.Add("c4g", "application/vnd.clonk.c4group");
                _dict.Add("c4p", "application/vnd.clonk.c4group");
                _dict.Add("c4u", "application/vnd.clonk.c4group");
                _dict.Add("cab", "application/vnd.ms-cab-compressed");
                _dict.Add("caf", "audio/x-caf");
                _dict.Add("cap", "application/vnd.tcpdump.pcap");
                _dict.Add("car", "application/vnd.curl.car");
                _dict.Add("cat", "application/vnd.ms-pki.seccat");
                _dict.Add("cb7", "application/x-cbr");
                _dict.Add("cba", "application/x-cbr");
                _dict.Add("cbr", "application/x-cbr");
                _dict.Add("cbt", "application/x-cbr");
                _dict.Add("cbz", "application/x-cbr");
                _dict.Add("cc", "text/x-c");
                _dict.Add("cct", "application/x-director");
                _dict.Add("ccxml", "application/ccxml+xml");
                _dict.Add("cdbcmsg", "application/vnd.contact.cmsg");
                _dict.Add("cdf", "application/x-netcdf");
                _dict.Add("cdkey", "application/vnd.mediastation.cdkey");
                _dict.Add("cdmia", "application/cdmi-capability");
                _dict.Add("cdmic", "application/cdmi-container");
                _dict.Add("cdmid", "application/cdmi-domain");
                _dict.Add("cdmio", "application/cdmi-object");
                _dict.Add("cdmiq", "application/cdmi-queue");
                _dict.Add("cdx", "chemical/x-cdx");
                _dict.Add("cdxml", "application/vnd.chemdraw+xml");
                _dict.Add("cdy", "application/vnd.cinderella");
                _dict.Add("cer", "application/pkix-cert");
                _dict.Add("cfs", "application/x-cfs-compressed");
                _dict.Add("cgm", "image/cgm");
                _dict.Add("chat", "application/x-chat");
                _dict.Add("chm", "application/vnd.ms-htmlhelp");
                _dict.Add("chrt", "application/vnd.kde.kchart");
                _dict.Add("cif", "chemical/x-cif");
                _dict.Add("cii", "application/vnd.anser-web-certificate-issue-initiation");
                _dict.Add("cil", "application/vnd.ms-artgalry");
                _dict.Add("cla", "application/vnd.claymore");
                _dict.Add("class", "application/java-vm");
                _dict.Add("clkk", "application/vnd.crick.clicker.keyboard");
                _dict.Add("clkp", "application/vnd.crick.clicker.palette");
                _dict.Add("clkt", "application/vnd.crick.clicker.template");
                _dict.Add("clkw", "application/vnd.crick.clicker.wordbank");
                _dict.Add("clkx", "application/vnd.crick.clicker");
                _dict.Add("clp", "application/x-msclip");
                _dict.Add("cmc", "application/vnd.cosmocaller");
                _dict.Add("cmdf", "chemical/x-cmdf");
                _dict.Add("cml", "chemical/x-cml");
                _dict.Add("cmp", "application/vnd.yellowriver-custom-menu");
                _dict.Add("cmx", "image/x-cmx");
                _dict.Add("cod", "application/vnd.rim.cod");
                _dict.Add("com", "application/x-msdownload");
                _dict.Add("conf", "text/plain");
                _dict.Add("cpio", "application/x-cpio");
                _dict.Add("cpp", "text/x-c");
                _dict.Add("cpt", "application/mac-compactpro");
                _dict.Add("crd", "application/x-mscardfile");
                _dict.Add("crl", "application/pkix-crl");
                _dict.Add("crt", "application/x-x509-ca-cert");
                _dict.Add("cryptonote", "application/vnd.rig.cryptonote");
                _dict.Add("csh", "application/x-csh");
                _dict.Add("csml", "chemical/x-csml");
                _dict.Add("csp", "application/vnd.commonspace");
                _dict.Add("css", "text/css");
                _dict.Add("cst", "application/x-director");
                _dict.Add("csv", "text/csv");
                _dict.Add("cu", "application/cu-seeme");
                _dict.Add("curl", "text/vnd.curl");
                _dict.Add("cww", "application/prs.cww");
                _dict.Add("cxt", "application/x-director");
                _dict.Add("cxx", "text/x-c");
                _dict.Add("dae", "model/vnd.collada+xml");
                _dict.Add("daf", "application/vnd.mobius.daf");
                _dict.Add("dart", "application/vnd.dart");
                _dict.Add("dataless", "application/vnd.fdsn.seed");
                _dict.Add("davmount", "application/davmount+xml");
                _dict.Add("dbk", "application/docbook+xml");
                _dict.Add("dcr", "application/x-director");
                _dict.Add("dcurl", "text/vnd.curl.dcurl");
                _dict.Add("dd2", "application/vnd.oma.dd2+xml");
                _dict.Add("ddd", "application/vnd.fujixerox.ddd");
                _dict.Add("deb", "application/x-debian-package");
                _dict.Add("def", "text/plain");
                _dict.Add("deploy", "application/octet-stream");
                _dict.Add("der", "application/x-x509-ca-cert");
                _dict.Add("dfac", "application/vnd.dreamfactory");
                _dict.Add("dgc", "application/x-dgc-compressed");
                _dict.Add("dic", "text/x-c");
                _dict.Add("dir", "application/x-director");
                _dict.Add("dis", "application/vnd.mobius.dis");
                _dict.Add("dist", "application/octet-stream");
                _dict.Add("distz", "application/octet-stream");
                _dict.Add("djv", "image/vnd.djvu");
                _dict.Add("djvu", "image/vnd.djvu");
                _dict.Add("dll", "application/x-msdownload");
                _dict.Add("dmg", "application/x-apple-diskimage");
                _dict.Add("dmp", "application/vnd.tcpdump.pcap");
                _dict.Add("dms", "application/octet-stream");
                _dict.Add("dna", "application/vnd.dna");
                _dict.Add("doc", "application/msword");
                _dict.Add("docm", "application/vnd.ms-word.document.macroenabled.12");
                _dict.Add("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
                _dict.Add("dot", "application/msword");
                _dict.Add("dotm", "application/vnd.ms-word.template.macroenabled.12");
                _dict.Add("dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template");
                _dict.Add("dp", "application/vnd.osgi.dp");
                _dict.Add("dpg", "application/vnd.dpgraph");
                _dict.Add("dra", "audio/vnd.dra");
                _dict.Add("dsc", "text/prs.lines.tag");
                _dict.Add("dssc", "application/dssc+der");
                _dict.Add("dtb", "application/x-dtbook+xml");
                _dict.Add("dtd", "application/xml-dtd");
                _dict.Add("dts", "audio/vnd.dts");
                _dict.Add("dtshd", "audio/vnd.dts.hd");
                _dict.Add("dump", "application/octet-stream");
                _dict.Add("dvb", "video/vnd.dvb.file");
                _dict.Add("dvi", "application/x-dvi");
                _dict.Add("dwf", "model/vnd.dwf");
                _dict.Add("dwg", "image/vnd.dwg");
                _dict.Add("dxf", "image/vnd.dxf");
                _dict.Add("dxp", "application/vnd.spotfire.dxp");
                _dict.Add("dxr", "application/x-director");
                _dict.Add("ecelp4800", "audio/vnd.nuera.ecelp4800");
                _dict.Add("ecelp7470", "audio/vnd.nuera.ecelp7470");
                _dict.Add("ecelp9600", "audio/vnd.nuera.ecelp9600");
                _dict.Add("ecma", "application/ecmascript");
                _dict.Add("edm", "application/vnd.novadigm.edm");
                _dict.Add("edx", "application/vnd.novadigm.edx");
                _dict.Add("efif", "application/vnd.picsel");
                _dict.Add("ei6", "application/vnd.pg.osasli");
                _dict.Add("elc", "application/octet-stream");
                _dict.Add("emf", "application/x-msmetafile");
                _dict.Add("eml", "message/rfc822");
                _dict.Add("emma", "application/emma+xml");
                _dict.Add("emz", "application/x-msmetafile");
                _dict.Add("eol", "audio/vnd.digital-winds");
                _dict.Add("eot", "application/vnd.ms-fontobject");
                _dict.Add("eps", "application/postscript");
                _dict.Add("epub", "application/epub+zip");
                _dict.Add("es3", "application/vnd.eszigno3+xml");
                _dict.Add("esa", "application/vnd.osgi.subsystem");
                _dict.Add("esf", "application/vnd.epson.esf");
                _dict.Add("et3", "application/vnd.eszigno3+xml");
                _dict.Add("etx", "text/x-setext");
                _dict.Add("eva", "application/x-eva");
                _dict.Add("evy", "application/x-envoy");
                _dict.Add("exe", "application/x-msdownload");
                _dict.Add("exi", "application/exi");
                _dict.Add("ext", "application/vnd.novadigm.ext");
                _dict.Add("ez", "application/andrew-inset");
                _dict.Add("ez2", "application/vnd.ezpix-album");
                _dict.Add("ez3", "application/vnd.ezpix-package");
                _dict.Add("f", "text/x-fortran");
                _dict.Add("f4v", "video/x-f4v");
                _dict.Add("f77", "text/x-fortran");
                _dict.Add("f90", "text/x-fortran");
                _dict.Add("fbs", "image/vnd.fastbidsheet");
                _dict.Add("fcdt", "application/vnd.adobe.formscentral.fcdt");
                _dict.Add("fcs", "application/vnd.isac.fcs");
                _dict.Add("fdf", "application/vnd.fdf");
                _dict.Add("fe_launch", "application/vnd.denovo.fcselayout-link");
                _dict.Add("fg5", "application/vnd.fujitsu.oasysgp");
                _dict.Add("fgd", "application/x-director");
                _dict.Add("fh", "image/x-freehand");
                _dict.Add("fh4", "image/x-freehand");
                _dict.Add("fh5", "image/x-freehand");
                _dict.Add("fh7", "image/x-freehand");
                _dict.Add("fhc", "image/x-freehand");
                _dict.Add("fig", "application/x-xfig");
                _dict.Add("flac", "audio/x-flac");
                _dict.Add("fli", "video/x-fli");
                _dict.Add("flo", "application/vnd.micrografx.flo");
                _dict.Add("flv", "video/x-flv");
                _dict.Add("flw", "application/vnd.kde.kivio");
                _dict.Add("flx", "text/vnd.fmi.flexstor");
                _dict.Add("fly", "text/vnd.fly");
                _dict.Add("fm", "application/vnd.framemaker");
                _dict.Add("fnc", "application/vnd.frogans.fnc");
                _dict.Add("for", "text/x-fortran");
                _dict.Add("fpx", "image/vnd.fpx");
                _dict.Add("frame", "application/vnd.framemaker");
                _dict.Add("fsc", "application/vnd.fsc.weblaunch");
                _dict.Add("fst", "image/vnd.fst");
                _dict.Add("ftc", "application/vnd.fluxtime.clip");
                _dict.Add("fti", "application/vnd.anser-web-funds-transfer-initiation");
                _dict.Add("fvt", "video/vnd.fvt");
                _dict.Add("fxp", "application/vnd.adobe.fxp");
                _dict.Add("fxpl", "application/vnd.adobe.fxp");
                _dict.Add("fzs", "application/vnd.fuzzysheet");
                _dict.Add("g2w", "application/vnd.geoplan");
                _dict.Add("g3", "image/g3fax");
                _dict.Add("g3w", "application/vnd.geospace");
                _dict.Add("gac", "application/vnd.groove-account");
                _dict.Add("gam", "application/x-tads");
                _dict.Add("gbr", "application/rpki-ghostbusters");
                _dict.Add("gca", "application/x-gca-compressed");
                _dict.Add("gdl", "model/vnd.gdl");
                _dict.Add("geo", "application/vnd.dynageo");
                _dict.Add("gex", "application/vnd.geometry-explorer");
                _dict.Add("ggb", "application/vnd.geogebra.file");
                _dict.Add("ggt", "application/vnd.geogebra.tool");
                _dict.Add("ghf", "application/vnd.groove-help");
                _dict.Add("gif", "image/gif");
                _dict.Add("gim", "application/vnd.groove-identity-message");
                _dict.Add("gml", "application/gml+xml");
                _dict.Add("gmx", "application/vnd.gmx");
                _dict.Add("gnumeric", "application/x-gnumeric");
                _dict.Add("gph", "application/vnd.flographit");
                _dict.Add("gpx", "application/gpx+xml");
                _dict.Add("gqf", "application/vnd.grafeq");
                _dict.Add("gqs", "application/vnd.grafeq");
                _dict.Add("gram", "application/srgs");
                _dict.Add("gramps", "application/x-gramps-xml");
                _dict.Add("gre", "application/vnd.geometry-explorer");
                _dict.Add("grv", "application/vnd.groove-injector");
                _dict.Add("grxml", "application/srgs+xml");
                _dict.Add("gsf", "application/x-font-ghostscript");
                _dict.Add("gtar", "application/x-gtar");
                _dict.Add("gtm", "application/vnd.groove-tool-message");
                _dict.Add("gtw", "model/vnd.gtw");
                _dict.Add("gv", "text/vnd.graphviz");
                _dict.Add("gxf", "application/gxf");
                _dict.Add("gxt", "application/vnd.geonext");
				_dict.Add("gz", "application/x-gzip");
                _dict.Add("h", "text/x-c");
                _dict.Add("h261", "video/h261");
                _dict.Add("h263", "video/h263");
                _dict.Add("h264", "video/h264");
                _dict.Add("hal", "application/vnd.hal+xml");
                _dict.Add("hbci", "application/vnd.hbci");
                _dict.Add("hdf", "application/x-hdf");
                _dict.Add("hh", "text/x-c");
                _dict.Add("hlp", "application/winhlp");
                _dict.Add("hpgl", "application/vnd.hp-hpgl");
                _dict.Add("hpid", "application/vnd.hp-hpid");
                _dict.Add("hps", "application/vnd.hp-hps");
                _dict.Add("hqx", "application/mac-binhex40");
                _dict.Add("htke", "application/vnd.kenameaapp");
                _dict.Add("htm", "text/html");
                _dict.Add("html", "text/html");
                _dict.Add("hvd", "application/vnd.yamaha.hv-dic");
                _dict.Add("hvp", "application/vnd.yamaha.hv-voice");
                _dict.Add("hvs", "application/vnd.yamaha.hv-script");
                _dict.Add("i2g", "application/vnd.intergeo");
                _dict.Add("icc", "application/vnd.iccprofile");
                _dict.Add("ice", "x-conference/x-cooltalk");
                _dict.Add("icm", "application/vnd.iccprofile");
                _dict.Add("ico", "image/x-icon");
                _dict.Add("ics", "text/calendar");
                _dict.Add("ief", "image/ief");
                _dict.Add("ifb", "text/calendar");
                _dict.Add("ifm", "application/vnd.shana.informed.formdata");
                _dict.Add("iges", "model/iges");
                _dict.Add("igl", "application/vnd.igloader");
                _dict.Add("igm", "application/vnd.insors.igm");
                _dict.Add("igs", "model/iges");
                _dict.Add("igx", "application/vnd.micrografx.igx");
                _dict.Add("iif", "application/vnd.shana.informed.interchange");
                _dict.Add("imp", "application/vnd.accpac.simply.imp");
                _dict.Add("ims", "application/vnd.ms-ims");
                _dict.Add("in", "text/plain");
                _dict.Add("ink", "application/inkml+xml");
                _dict.Add("inkml", "application/inkml+xml");
                _dict.Add("install", "application/x-install-instructions");
                _dict.Add("iota", "application/vnd.astraea-software.iota");
                _dict.Add("ipfix", "application/ipfix");
                _dict.Add("ipk", "application/vnd.shana.informed.package");
                _dict.Add("irm", "application/vnd.ibm.rights-management");
                _dict.Add("irp", "application/vnd.irepository.package+xml");
                _dict.Add("iso", "application/x-iso9660-image");
                _dict.Add("itp", "application/vnd.shana.informed.formtemplate");
                _dict.Add("ivp", "application/vnd.immervision-ivp");
                _dict.Add("ivu", "application/vnd.immervision-ivu");
                _dict.Add("jad", "text/vnd.sun.j2me.app-descriptor");
                _dict.Add("jam", "application/vnd.jam");
                _dict.Add("jar", "application/java-archive");
                _dict.Add("java", "text/x-java-source");
                _dict.Add("jisp", "application/vnd.jisp");
                _dict.Add("jlt", "application/vnd.hp-jlyt");
                _dict.Add("jnlp", "application/x-java-jnlp-file");
                _dict.Add("joda", "application/vnd.joost.joda-archive");
                _dict.Add("jpe", "image/jpeg");
                _dict.Add("jpeg", "image/jpeg");
                _dict.Add("jpg", "image/jpeg");
                _dict.Add("jpgm", "video/jpm");
                _dict.Add("jpgv", "video/jpeg");
                _dict.Add("jpm", "video/jpm");
                _dict.Add("js", "application/javascript");
                _dict.Add("json", "application/json");
                _dict.Add("jsonml", "application/jsonml+json");
                _dict.Add("kar", "audio/midi");
                _dict.Add("karbon", "application/vnd.kde.karbon");
                _dict.Add("kfo", "application/vnd.kde.kformula");
                _dict.Add("kia", "application/vnd.kidspiration");
                _dict.Add("kml", "application/vnd.google-earth.kml+xml");
                _dict.Add("kmz", "application/vnd.google-earth.kmz");
                _dict.Add("kne", "application/vnd.kinar");
                _dict.Add("knp", "application/vnd.kinar");
                _dict.Add("kon", "application/vnd.kde.kontour");
                _dict.Add("kpr", "application/vnd.kde.kpresenter");
                _dict.Add("kpt", "application/vnd.kde.kpresenter");
                _dict.Add("kpxx", "application/vnd.ds-keypoint");
                _dict.Add("ksp", "application/vnd.kde.kspread");
                _dict.Add("ktr", "application/vnd.kahootz");
                _dict.Add("ktx", "image/ktx");
                _dict.Add("ktz", "application/vnd.kahootz");
                _dict.Add("kwd", "application/vnd.kde.kword");
                _dict.Add("kwt", "application/vnd.kde.kword");
                _dict.Add("lasxml", "application/vnd.las.las+xml");
                _dict.Add("latex", "application/x-latex");
                _dict.Add("lbd", "application/vnd.llamagraphics.life-balance.desktop");
                _dict.Add("lbe", "application/vnd.llamagraphics.life-balance.exchange+xml");
                _dict.Add("les", "application/vnd.hhe.lesson-player");
                _dict.Add("lha", "application/x-lzh-compressed");
                _dict.Add("link66", "application/vnd.route66.link66+xml");
                _dict.Add("list", "text/plain");
                _dict.Add("list3820", "application/vnd.ibm.modcap");
                _dict.Add("listafp", "application/vnd.ibm.modcap");
                _dict.Add("lnk", "application/x-ms-shortcut");
                _dict.Add("log", "text/plain");
                _dict.Add("lostxml", "application/lost+xml");
                _dict.Add("lrf", "application/octet-stream");
                _dict.Add("lrm", "application/vnd.ms-lrm");
                _dict.Add("ltf", "application/vnd.frogans.ltf");
                _dict.Add("lvp", "audio/vnd.lucent.voice");
                _dict.Add("lwp", "application/vnd.lotus-wordpro");
                _dict.Add("lzh", "application/x-lzh-compressed");
                _dict.Add("m13", "application/x-msmediaview");
                _dict.Add("m14", "application/x-msmediaview");
                _dict.Add("m1v", "video/mpeg");
                _dict.Add("m21", "application/mp21");
                _dict.Add("m2a", "audio/mpeg");
                _dict.Add("m2v", "video/mpeg");
                _dict.Add("m3a", "audio/mpeg");
                _dict.Add("m3u", "audio/x-mpegurl");
                _dict.Add("m3u8", "application/vnd.apple.mpegurl");
                _dict.Add("m4u", "video/vnd.mpegurl");
                _dict.Add("m4v", "video/x-m4v");
                _dict.Add("ma", "application/mathematica");
                _dict.Add("mads", "application/mads+xml");
                _dict.Add("mag", "application/vnd.ecowin.chart");
                _dict.Add("maker", "application/vnd.framemaker");
                _dict.Add("man", "text/troff");
                _dict.Add("mar", "application/octet-stream");
                _dict.Add("mathml", "application/mathml+xml");
                _dict.Add("mb", "application/mathematica");
                _dict.Add("mbk", "application/vnd.mobius.mbk");
                _dict.Add("mbox", "application/mbox");
                _dict.Add("mc1", "application/vnd.medcalcdata");
                _dict.Add("mcd", "application/vnd.mcd");
                _dict.Add("mcurl", "text/vnd.curl.mcurl");
                _dict.Add("mdb", "application/x-msaccess");
                _dict.Add("mdi", "image/vnd.ms-modi");
                _dict.Add("me", "text/troff");
                _dict.Add("mesh", "model/mesh");
                _dict.Add("meta4", "application/metalink4+xml");
                _dict.Add("metalink", "application/metalink+xml");
                _dict.Add("mets", "application/mets+xml");
                _dict.Add("mfm", "application/vnd.mfmp");
                _dict.Add("mft", "application/rpki-manifest");
                _dict.Add("mgp", "application/vnd.osgeo.mapguide.package");
                _dict.Add("mgz", "application/vnd.proteus.magazine");
                _dict.Add("mid", "audio/midi");
                _dict.Add("midi", "audio/midi");
                _dict.Add("mie", "application/x-mie");
                _dict.Add("mif", "application/vnd.mif");
                _dict.Add("mime", "message/rfc822");
                _dict.Add("mj2", "video/mj2");
                _dict.Add("mjp2", "video/mj2");
                _dict.Add("mk3d", "video/x-matroska");
                _dict.Add("mka", "audio/x-matroska");
                _dict.Add("mks", "video/x-matroska");
                _dict.Add("mkv", "video/x-matroska");
                _dict.Add("mlp", "application/vnd.dolby.mlp");
                _dict.Add("mmd", "application/vnd.chipnuts.karaoke-mmd");
                _dict.Add("mmf", "application/vnd.smaf");
                _dict.Add("mmr", "image/vnd.fujixerox.edmics-mmr");
                _dict.Add("mng", "video/x-mng");
                _dict.Add("mny", "application/x-msmoney");
                _dict.Add("mobi", "application/x-mobipocket-ebook");
                _dict.Add("mods", "application/mods+xml");
                _dict.Add("mov", "video/quicktime");
                _dict.Add("movie", "video/x-sgi-movie");
                _dict.Add("mp2", "audio/mpeg");
                _dict.Add("mp21", "application/mp21");
                _dict.Add("mp2a", "audio/mpeg");
                _dict.Add("mp3", "audio/mpeg");
                _dict.Add("mp4", "video/mp4");
                _dict.Add("mp4a", "audio/mp4");
                _dict.Add("mp4s", "application/mp4");
                _dict.Add("mp4v", "video/mp4");
                _dict.Add("mpc", "application/vnd.mophun.certificate");
                _dict.Add("mpe", "video/mpeg");
                _dict.Add("mpeg", "video/mpeg");
                _dict.Add("mpg", "video/mpeg");
                _dict.Add("mpg4", "video/mp4");
                _dict.Add("mpga", "audio/mpeg");
                _dict.Add("mpkg", "application/vnd.apple.installer+xml");
                _dict.Add("mpm", "application/vnd.blueice.multipass");
                _dict.Add("mpn", "application/vnd.mophun.application");
                _dict.Add("mpp", "application/vnd.ms-project");
                _dict.Add("mpt", "application/vnd.ms-project");
                _dict.Add("mpy", "application/vnd.ibm.minipay");
                _dict.Add("mqy", "application/vnd.mobius.mqy");
                _dict.Add("mrc", "application/marc");
                _dict.Add("mrcx", "application/marcxml+xml");
                _dict.Add("ms", "text/troff");
                _dict.Add("mscml", "application/mediaservercontrol+xml");
                _dict.Add("mseed", "application/vnd.fdsn.mseed");
                _dict.Add("mseq", "application/vnd.mseq");
                _dict.Add("msf", "application/vnd.epson.msf");
                _dict.Add("msh", "model/mesh");
                _dict.Add("msi", "application/x-msdownload");
                _dict.Add("msl", "application/vnd.mobius.msl");
                _dict.Add("msty", "application/vnd.muvee.style");
                _dict.Add("mts", "model/vnd.mts");
                _dict.Add("mus", "application/vnd.musician");
                _dict.Add("musicxml", "application/vnd.recordare.musicxml+xml");
                _dict.Add("mvb", "application/x-msmediaview");
                _dict.Add("mwf", "application/vnd.mfer");
                _dict.Add("mxf", "application/mxf");
                _dict.Add("mxl", "application/vnd.recordare.musicxml");
                _dict.Add("mxml", "application/xv+xml");
                _dict.Add("mxs", "application/vnd.triscape.mxs");
                _dict.Add("mxu", "video/vnd.mpegurl");
                _dict.Add("n-gage", "application/vnd.nokia.n-gage.symbian.install");
                _dict.Add("n3", "text/n3");
                _dict.Add("nb", "application/mathematica");
                _dict.Add("nbp", "application/vnd.wolfram.player");
                _dict.Add("nc", "application/x-netcdf");
                _dict.Add("ncx", "application/x-dtbncx+xml");
                _dict.Add("nfo", "text/x-nfo");
                _dict.Add("ngdat", "application/vnd.nokia.n-gage.data");
                _dict.Add("nitf", "application/vnd.nitf");
                _dict.Add("nlu", "application/vnd.neurolanguage.nlu");
                _dict.Add("nml", "application/vnd.enliven");
                _dict.Add("nnd", "application/vnd.noblenet-directory");
                _dict.Add("nns", "application/vnd.noblenet-sealer");
                _dict.Add("nnw", "application/vnd.noblenet-web");
                _dict.Add("npx", "image/vnd.net-fpx");
                _dict.Add("nsc", "application/x-conference");
                _dict.Add("nsf", "application/vnd.lotus-notes");
                _dict.Add("ntf", "application/vnd.nitf");
                _dict.Add("nzb", "application/x-nzb");
                _dict.Add("oa2", "application/vnd.fujitsu.oasys2");
                _dict.Add("oa3", "application/vnd.fujitsu.oasys3");
                _dict.Add("oas", "application/vnd.fujitsu.oasys");
                _dict.Add("obd", "application/x-msbinder");
                _dict.Add("obj", "application/x-tgif");
                _dict.Add("oda", "application/oda");
                _dict.Add("odb", "application/vnd.oasis.opendocument.database");
                _dict.Add("odc", "application/vnd.oasis.opendocument.chart");
                _dict.Add("odf", "application/vnd.oasis.opendocument.formula");
                _dict.Add("odft", "application/vnd.oasis.opendocument.formula-template");
                _dict.Add("odg", "application/vnd.oasis.opendocument.graphics");
                _dict.Add("odi", "application/vnd.oasis.opendocument.image");
                _dict.Add("odm", "application/vnd.oasis.opendocument.text-master");
                _dict.Add("odp", "application/vnd.oasis.opendocument.presentation");
                _dict.Add("ods", "application/vnd.oasis.opendocument.spreadsheet");
                _dict.Add("odt", "application/vnd.oasis.opendocument.text");
                _dict.Add("oga", "audio/ogg");
                _dict.Add("ogg", "audio/ogg");
                _dict.Add("ogv", "video/ogg");
                _dict.Add("ogx", "application/ogg");
                _dict.Add("omdoc", "application/omdoc+xml");
                _dict.Add("onepkg", "application/onenote");
                _dict.Add("onetmp", "application/onenote");
                _dict.Add("onetoc", "application/onenote");
                _dict.Add("onetoc2", "application/onenote");
                _dict.Add("opf", "application/oebps-package+xml");
                _dict.Add("opml", "text/x-opml");
                _dict.Add("oprc", "application/vnd.palm");
                _dict.Add("org", "application/vnd.lotus-organizer");
                _dict.Add("osf", "application/vnd.yamaha.openscoreformat");
                _dict.Add("osfpvg", "application/vnd.yamaha.openscoreformat.osfpvg+xml");
                _dict.Add("otc", "application/vnd.oasis.opendocument.chart-template");
                _dict.Add("otf", "application/x-font-otf");
                _dict.Add("otg", "application/vnd.oasis.opendocument.graphics-template");
                _dict.Add("oth", "application/vnd.oasis.opendocument.text-web");
                _dict.Add("oti", "application/vnd.oasis.opendocument.image-template");
                _dict.Add("otp", "application/vnd.oasis.opendocument.presentation-template");
                _dict.Add("ots", "application/vnd.oasis.opendocument.spreadsheet-template");
                _dict.Add("ott", "application/vnd.oasis.opendocument.text-template");
                _dict.Add("oxps", "application/oxps");
                _dict.Add("oxt", "application/vnd.openofficeorg.extension");
                _dict.Add("p", "text/x-pascal");
                _dict.Add("p10", "application/pkcs10");
                _dict.Add("p12", "application/x-pkcs12");
                _dict.Add("p7b", "application/x-pkcs7-certificates");
                _dict.Add("p7c", "application/pkcs7-mime");
                _dict.Add("p7m", "application/pkcs7-mime");
                _dict.Add("p7r", "application/x-pkcs7-certreqresp");
                _dict.Add("p7s", "application/pkcs7-signature");
                _dict.Add("p8", "application/pkcs8");
                _dict.Add("pas", "text/x-pascal");
                _dict.Add("paw", "application/vnd.pawaafile");
                _dict.Add("pbd", "application/vnd.powerbuilder6");
                _dict.Add("pbm", "image/x-portable-bitmap");
                _dict.Add("pcap", "application/vnd.tcpdump.pcap");
                _dict.Add("pcf", "application/x-font-pcf");
                _dict.Add("pcl", "application/vnd.hp-pcl");
                _dict.Add("pclxl", "application/vnd.hp-pclxl");
                _dict.Add("pct", "image/x-pict");
                _dict.Add("pcurl", "application/vnd.curl.pcurl");
                _dict.Add("pcx", "image/x-pcx");
                _dict.Add("pdb", "application/vnd.palm");
                _dict.Add("pdf", "application/pdf");
                _dict.Add("pfa", "application/x-font-type1");
                _dict.Add("pfb", "application/x-font-type1");
                _dict.Add("pfm", "application/x-font-type1");
                _dict.Add("pfr", "application/font-tdpfr");
                _dict.Add("pfx", "application/x-pkcs12");
                _dict.Add("pgm", "image/x-portable-graymap");
                _dict.Add("pgn", "application/x-chess-pgn");
                _dict.Add("pgp", "application/pgp-encrypted");
                _dict.Add("pic", "image/x-pict");
                _dict.Add("pkg", "application/octet-stream");
                _dict.Add("pki", "application/pkixcmp");
                _dict.Add("pkipath", "application/pkix-pkipath");
                _dict.Add("plb", "application/vnd.3gpp.pic-bw-large");
                _dict.Add("plc", "application/vnd.mobius.plc");
                _dict.Add("plf", "application/vnd.pocketlearn");
                _dict.Add("pls", "application/pls+xml");
                _dict.Add("pml", "application/vnd.ctc-posml");
                _dict.Add("png", "image/png");
                _dict.Add("pnm", "image/x-portable-anymap");
                _dict.Add("portpkg", "application/vnd.macports.portpkg");
                _dict.Add("pot", "application/vnd.ms-powerpoint");
                _dict.Add("potm", "application/vnd.ms-powerpoint.template.macroenabled.12");
                _dict.Add("potx", "application/vnd.openxmlformats-officedocument.presentationml.template");
                _dict.Add("ppam", "application/vnd.ms-powerpoint.addin.macroenabled.12");
                _dict.Add("ppd", "application/vnd.cups-ppd");
                _dict.Add("ppm", "image/x-portable-pixmap");
                _dict.Add("pps", "application/vnd.ms-powerpoint");
                _dict.Add("ppsm", "application/vnd.ms-powerpoint.slideshow.macroenabled.12");
                _dict.Add("ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow");
                _dict.Add("ppt", "application/vnd.ms-powerpoint");
                _dict.Add("pptm", "application/vnd.ms-powerpoint.presentation.macroenabled.12");
                _dict.Add("pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
                _dict.Add("pqa", "application/vnd.palm");
                _dict.Add("prc", "application/x-mobipocket-ebook");
                _dict.Add("pre", "application/vnd.lotus-freelance");
                _dict.Add("prf", "application/pics-rules");
                _dict.Add("ps", "application/postscript");
                _dict.Add("psb", "application/vnd.3gpp.pic-bw-small");
                _dict.Add("psd", "image/vnd.adobe.photoshop");
                _dict.Add("psf", "application/x-font-linux-psf");
                _dict.Add("pskcxml", "application/pskc+xml");
                _dict.Add("ptid", "application/vnd.pvi.ptid1");
                _dict.Add("pub", "application/x-mspublisher");
                _dict.Add("pvb", "application/vnd.3gpp.pic-bw-var");
                _dict.Add("pwn", "application/vnd.3m.post-it-notes");
                _dict.Add("pya", "audio/vnd.ms-playready.media.pya");
                _dict.Add("pyv", "video/vnd.ms-playready.media.pyv");
                _dict.Add("qam", "application/vnd.epson.quickanime");
                _dict.Add("qbo", "application/vnd.intu.qbo");
                _dict.Add("qfx", "application/vnd.intu.qfx");
                _dict.Add("qps", "application/vnd.publishare-delta-tree");
                _dict.Add("qt", "video/quicktime");
                _dict.Add("qwd", "application/vnd.quark.quarkxpress");
                _dict.Add("qwt", "application/vnd.quark.quarkxpress");
                _dict.Add("qxb", "application/vnd.quark.quarkxpress");
                _dict.Add("qxd", "application/vnd.quark.quarkxpress");
                _dict.Add("qxl", "application/vnd.quark.quarkxpress");
                _dict.Add("qxt", "application/vnd.quark.quarkxpress");
                _dict.Add("ra", "audio/x-pn-realaudio");
                _dict.Add("ram", "audio/x-pn-realaudio");
                _dict.Add("rar", "application/x-rar-compressed");
                _dict.Add("ras", "image/x-cmu-raster");
                _dict.Add("rcprofile", "application/vnd.ipunplugged.rcprofile");
                _dict.Add("rdf", "application/rdf+xml");
                _dict.Add("rdz", "application/vnd.data-vision.rdz");
                _dict.Add("rep", "application/vnd.businessobjects");
                _dict.Add("res", "application/x-dtbresource+xml");
                _dict.Add("rgb", "image/x-rgb");
                _dict.Add("rif", "application/reginfo+xml");
                _dict.Add("rip", "audio/vnd.rip");
                _dict.Add("ris", "application/x-research-info-systems");
                _dict.Add("rl", "application/resource-lists+xml");
                _dict.Add("rlc", "image/vnd.fujixerox.edmics-rlc");
                _dict.Add("rld", "application/resource-lists-diff+xml");
                _dict.Add("rm", "application/vnd.rn-realmedia");
                _dict.Add("rmi", "audio/midi");
                _dict.Add("rmp", "audio/x-pn-realaudio-plugin");
                _dict.Add("rms", "application/vnd.jcp.javame.midlet-rms");
                _dict.Add("rmvb", "application/vnd.rn-realmedia-vbr");
                _dict.Add("rnc", "application/relax-ng-compact-syntax");
                _dict.Add("roa", "application/rpki-roa");
                _dict.Add("roff", "text/troff");
                _dict.Add("rp9", "application/vnd.cloanto.rp9");
                _dict.Add("rpss", "application/vnd.nokia.radio-presets");
                _dict.Add("rpst", "application/vnd.nokia.radio-preset");
                _dict.Add("rq", "application/sparql-query");
                _dict.Add("rs", "application/rls-services+xml");
                _dict.Add("rsd", "application/rsd+xml");
                _dict.Add("rss", "application/rss+xml");
                _dict.Add("rtf", "application/rtf");
                _dict.Add("rtx", "text/richtext");
                _dict.Add("s", "text/x-asm");
                _dict.Add("s3m", "audio/s3m");
                _dict.Add("saf", "application/vnd.yamaha.smaf-audio");
                _dict.Add("sbml", "application/sbml+xml");
                _dict.Add("sc", "application/vnd.ibm.secure-container");
                _dict.Add("scd", "application/x-msschedule");
                _dict.Add("scm", "application/vnd.lotus-screencam");
                _dict.Add("scq", "application/scvp-cv-request");
                _dict.Add("scs", "application/scvp-cv-response");
                _dict.Add("scurl", "text/vnd.curl.scurl");
                _dict.Add("sda", "application/vnd.stardivision.draw");
                _dict.Add("sdc", "application/vnd.stardivision.calc");
                _dict.Add("sdd", "application/vnd.stardivision.impress");
                _dict.Add("sdkd", "application/vnd.solent.sdkm+xml");
                _dict.Add("sdkm", "application/vnd.solent.sdkm+xml");
                _dict.Add("sdp", "application/sdp");
                _dict.Add("sdw", "application/vnd.stardivision.writer");
                _dict.Add("see", "application/vnd.seemail");
                _dict.Add("seed", "application/vnd.fdsn.seed");
                _dict.Add("sema", "application/vnd.sema");
                _dict.Add("semd", "application/vnd.semd");
                _dict.Add("semf", "application/vnd.semf");
                _dict.Add("ser", "application/java-serialized-object");
                _dict.Add("setpay", "application/set-payment-initiation");
                _dict.Add("setreg", "application/set-registration-initiation");
                _dict.Add("sfd-hdstx", "application/vnd.hydrostatix.sof-data");
                _dict.Add("sfs", "application/vnd.spotfire.sfs");
                _dict.Add("sfv", "text/x-sfv");
                _dict.Add("sgi", "image/sgi");
                _dict.Add("sgl", "application/vnd.stardivision.writer-global");
                _dict.Add("sgm", "text/sgml");
                _dict.Add("sgml", "text/sgml");
                _dict.Add("sh", "application/x-sh");
                _dict.Add("shar", "application/x-shar");
                _dict.Add("shf", "application/shf+xml");
                _dict.Add("sid", "image/x-mrsid-image");
                _dict.Add("sig", "application/pgp-signature");
                _dict.Add("sil", "audio/silk");
                _dict.Add("silo", "model/mesh");
                _dict.Add("sis", "application/vnd.symbian.install");
                _dict.Add("sisx", "application/vnd.symbian.install");
                _dict.Add("sit", "application/x-stuffit");
                _dict.Add("sitx", "application/x-stuffitx");
                _dict.Add("skd", "application/vnd.koan");
                _dict.Add("skm", "application/vnd.koan");
                _dict.Add("skp", "application/vnd.koan");
                _dict.Add("skt", "application/vnd.koan");
                _dict.Add("sldm", "application/vnd.ms-powerpoint.slide.macroenabled.12");
                _dict.Add("sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide");
                _dict.Add("slt", "application/vnd.epson.salt");
                _dict.Add("sm", "application/vnd.stepmania.stepchart");
                _dict.Add("smf", "application/vnd.stardivision.math");
                _dict.Add("smi", "application/smil+xml");
                _dict.Add("smil", "application/smil+xml");
                _dict.Add("smv", "video/x-smv");
                _dict.Add("smzip", "application/vnd.stepmania.package");
                _dict.Add("snd", "audio/basic");
                _dict.Add("snf", "application/x-font-snf");
                _dict.Add("so", "application/octet-stream");
                _dict.Add("spc", "application/x-pkcs7-certificates");
                _dict.Add("spf", "application/vnd.yamaha.smaf-phrase");
                _dict.Add("spl", "application/x-futuresplash");
                _dict.Add("spot", "text/vnd.in3d.spot");
                _dict.Add("spp", "application/scvp-vp-response");
                _dict.Add("spq", "application/scvp-vp-request");
                _dict.Add("spx", "audio/ogg");
                _dict.Add("sql", "application/x-sql");
                _dict.Add("src", "application/x-wais-source");
                _dict.Add("srt", "application/x-subrip");
                _dict.Add("sru", "application/sru+xml");
                _dict.Add("srx", "application/sparql-results+xml");
                _dict.Add("ssdl", "application/ssdl+xml");
                _dict.Add("sse", "application/vnd.kodak-descriptor");
                _dict.Add("ssf", "application/vnd.epson.ssf");
                _dict.Add("ssml", "application/ssml+xml");
                _dict.Add("st", "application/vnd.sailingtracker.track");
                _dict.Add("stc", "application/vnd.sun.xml.calc.template");
                _dict.Add("std", "application/vnd.sun.xml.draw.template");
                _dict.Add("stf", "application/vnd.wt.stf");
                _dict.Add("sti", "application/vnd.sun.xml.impress.template");
                _dict.Add("stk", "application/hyperstudio");
                _dict.Add("stl", "application/vnd.ms-pki.stl");
                _dict.Add("str", "application/vnd.pg.format");
                _dict.Add("stw", "application/vnd.sun.xml.writer.template");
                _dict.Add("sub", "text/vnd.dvb.subtitle");
                _dict.Add("sus", "application/vnd.sus-calendar");
                _dict.Add("susp", "application/vnd.sus-calendar");
                _dict.Add("sv4cpio", "application/x-sv4cpio");
                _dict.Add("sv4crc", "application/x-sv4crc");
                _dict.Add("svc", "application/vnd.dvb.service");
                _dict.Add("svd", "application/vnd.svd");
                _dict.Add("svg", "image/svg+xml");
                _dict.Add("svgz", "image/svg+xml");
                _dict.Add("swa", "application/x-director");
                _dict.Add("swf", "application/x-shockwave-flash");
                _dict.Add("swi", "application/vnd.aristanetworks.swi");
                _dict.Add("sxc", "application/vnd.sun.xml.calc");
                _dict.Add("sxd", "application/vnd.sun.xml.draw");
                _dict.Add("sxg", "application/vnd.sun.xml.writer.global");
                _dict.Add("sxi", "application/vnd.sun.xml.impress");
                _dict.Add("sxm", "application/vnd.sun.xml.math");
                _dict.Add("sxw", "application/vnd.sun.xml.writer");
                _dict.Add("t", "text/troff");
                _dict.Add("t3", "application/x-t3vm-image");
                _dict.Add("taglet", "application/vnd.mynfc");
                _dict.Add("tao", "application/vnd.tao.intent-module-archive");
                _dict.Add("tar", "application/x-tar");
                _dict.Add("tcap", "application/vnd.3gpp2.tcap");
                _dict.Add("tcl", "application/x-tcl");
                _dict.Add("teacher", "application/vnd.smart.teacher");
                _dict.Add("tei", "application/tei+xml");
                _dict.Add("teicorpus", "application/tei+xml");
                _dict.Add("tex", "application/x-tex");
                _dict.Add("texi", "application/x-texinfo");
                _dict.Add("texinfo", "application/x-texinfo");
                _dict.Add("text", "text/plain");
                _dict.Add("tfi", "application/thraud+xml");
                _dict.Add("tfm", "application/x-tex-tfm");
                _dict.Add("tga", "image/x-tga");
				_dict.Add("tgz", "application/x-gzip");
                _dict.Add("thmx", "application/vnd.ms-officetheme");
                _dict.Add("tif", "image/tiff");
                _dict.Add("tiff", "image/tiff");
                _dict.Add("tmo", "application/vnd.tmobile-livetv");
                _dict.Add("torrent", "application/x-bittorrent");
                _dict.Add("tpl", "application/vnd.groove-tool-template");
                _dict.Add("tpt", "application/vnd.trid.tpt");
                _dict.Add("tr", "text/troff");
                _dict.Add("tra", "application/vnd.trueapp");
                _dict.Add("trm", "application/x-msterminal");
                _dict.Add("tsd", "application/timestamped-data");
                _dict.Add("tsv", "text/tab-separated-values");
                _dict.Add("ttc", "application/x-font-ttf");
                _dict.Add("ttf", "application/x-font-ttf");
                _dict.Add("ttl", "text/turtle");
                _dict.Add("twd", "application/vnd.simtech-mindmapper");
                _dict.Add("twds", "application/vnd.simtech-mindmapper");
                _dict.Add("txd", "application/vnd.genomatix.tuxedo");
                _dict.Add("txf", "application/vnd.mobius.txf");
                _dict.Add("txt", "text/plain");
                _dict.Add("u32", "application/x-authorware-bin");
                _dict.Add("udeb", "application/x-debian-package");
                _dict.Add("ufd", "application/vnd.ufdl");
                _dict.Add("ufdl", "application/vnd.ufdl");
                _dict.Add("ulx", "application/x-glulx");
                _dict.Add("umj", "application/vnd.umajin");
                _dict.Add("unityweb", "application/vnd.unity");
                _dict.Add("uoml", "application/vnd.uoml+xml");
                _dict.Add("uri", "text/uri-list");
                _dict.Add("uris", "text/uri-list");
                _dict.Add("urls", "text/uri-list");
                _dict.Add("ustar", "application/x-ustar");
                _dict.Add("utz", "application/vnd.uiq.theme");
                _dict.Add("uu", "text/x-uuencode");
                _dict.Add("uva", "audio/vnd.dece.audio");
                _dict.Add("uvd", "application/vnd.dece.data");
                _dict.Add("uvf", "application/vnd.dece.data");
                _dict.Add("uvg", "image/vnd.dece.graphic");
                _dict.Add("uvh", "video/vnd.dece.hd");
                _dict.Add("uvi", "image/vnd.dece.graphic");
                _dict.Add("uvm", "video/vnd.dece.mobile");
                _dict.Add("uvp", "video/vnd.dece.pd");
                _dict.Add("uvs", "video/vnd.dece.sd");
                _dict.Add("uvt", "application/vnd.dece.ttml+xml");
                _dict.Add("uvu", "video/vnd.uvvu.mp4");
                _dict.Add("uvv", "video/vnd.dece.video");
                _dict.Add("uvva", "audio/vnd.dece.audio");
                _dict.Add("uvvd", "application/vnd.dece.data");
                _dict.Add("uvvf", "application/vnd.dece.data");
                _dict.Add("uvvg", "image/vnd.dece.graphic");
                _dict.Add("uvvh", "video/vnd.dece.hd");
                _dict.Add("uvvi", "image/vnd.dece.graphic");
                _dict.Add("uvvm", "video/vnd.dece.mobile");
                _dict.Add("uvvp", "video/vnd.dece.pd");
                _dict.Add("uvvs", "video/vnd.dece.sd");
                _dict.Add("uvvt", "application/vnd.dece.ttml+xml");
                _dict.Add("uvvu", "video/vnd.uvvu.mp4");
                _dict.Add("uvvv", "video/vnd.dece.video");
                _dict.Add("uvvx", "application/vnd.dece.unspecified");
                _dict.Add("uvvz", "application/vnd.dece.zip");
                _dict.Add("uvx", "application/vnd.dece.unspecified");
                _dict.Add("uvz", "application/vnd.dece.zip");
                _dict.Add("vcard", "text/vcard");
                _dict.Add("vcd", "application/x-cdlink");
                _dict.Add("vcf", "text/x-vcard");
                _dict.Add("vcg", "application/vnd.groove-vcard");
                _dict.Add("vcs", "text/x-vcalendar");
                _dict.Add("vcx", "application/vnd.vcx");
                _dict.Add("vis", "application/vnd.visionary");
                _dict.Add("viv", "video/vnd.vivo");
                _dict.Add("vob", "video/x-ms-vob");
                _dict.Add("vor", "application/vnd.stardivision.writer");
                _dict.Add("vox", "application/x-authorware-bin");
                _dict.Add("vrml", "model/vrml");
                _dict.Add("vsd", "application/vnd.visio");
                _dict.Add("vsf", "application/vnd.vsf");
                _dict.Add("vss", "application/vnd.visio");
                _dict.Add("vst", "application/vnd.visio");
                _dict.Add("vsw", "application/vnd.visio");
                _dict.Add("vtu", "model/vnd.vtu");
                _dict.Add("vxml", "application/voicexml+xml");
                _dict.Add("w3d", "application/x-director");
                _dict.Add("wad", "application/x-doom");
                _dict.Add("wav", "audio/x-wav");
                _dict.Add("wax", "audio/x-ms-wax");
                _dict.Add("wbmp", "image/vnd.wap.wbmp");
                _dict.Add("wbs", "application/vnd.criticaltools.wbs+xml");
                _dict.Add("wbxml", "application/vnd.wap.wbxml");
                _dict.Add("wcm", "application/vnd.ms-works");
                _dict.Add("wdb", "application/vnd.ms-works");
                _dict.Add("wdp", "image/vnd.ms-photo");
                _dict.Add("weba", "audio/webm");
                _dict.Add("webm", "video/webm");
                _dict.Add("webp", "image/webp");
                _dict.Add("wg", "application/vnd.pmi.widget");
                _dict.Add("wgt", "application/widget");
                _dict.Add("wks", "application/vnd.ms-works");
                _dict.Add("wm", "video/x-ms-wm");
                _dict.Add("wma", "audio/x-ms-wma");
                _dict.Add("wmd", "application/x-ms-wmd");
                _dict.Add("wmf", "application/x-msmetafile");
                _dict.Add("wml", "text/vnd.wap.wml");
                _dict.Add("wmlc", "application/vnd.wap.wmlc");
                _dict.Add("wmls", "text/vnd.wap.wmlscript");
                _dict.Add("wmlsc", "application/vnd.wap.wmlscriptc");
                _dict.Add("wmv", "video/x-ms-wmv");
                _dict.Add("wmx", "video/x-ms-wmx");
                _dict.Add("wmz", "application/x-ms-wmz");
                _dict.Add("woff", "application/x-font-woff");
                _dict.Add("wpd", "application/vnd.wordperfect");
                _dict.Add("wpl", "application/vnd.ms-wpl");
                _dict.Add("wps", "application/vnd.ms-works");
                _dict.Add("wqd", "application/vnd.wqd");
                _dict.Add("wri", "application/x-mswrite");
                _dict.Add("wrl", "model/vrml");
                _dict.Add("wsdl", "application/wsdl+xml");
                _dict.Add("wspolicy", "application/wspolicy+xml");
                _dict.Add("wtb", "application/vnd.webturbo");
                _dict.Add("wvx", "video/x-ms-wvx");
                _dict.Add("x32", "application/x-authorware-bin");
                _dict.Add("x3d", "model/x3d+xml");
                _dict.Add("x3db", "model/x3d+binary");
                _dict.Add("x3dbz", "model/x3d+binary");
                _dict.Add("x3dv", "model/x3d+vrml");
                _dict.Add("x3dvz", "model/x3d+vrml");
                _dict.Add("x3dz", "model/x3d+xml");
                _dict.Add("xaml", "application/xaml+xml");
                _dict.Add("xap", "application/x-silverlight-app");
                _dict.Add("xar", "application/vnd.xara");
                _dict.Add("xbap", "application/x-ms-xbap");
                _dict.Add("xbd", "application/vnd.fujixerox.docuworks.binder");
                _dict.Add("xbm", "image/x-xbitmap");
                _dict.Add("xdf", "application/xcap-diff+xml");
                _dict.Add("xdm", "application/vnd.syncml.dm+xml");
                _dict.Add("xdp", "application/vnd.adobe.xdp+xml");
                _dict.Add("xdssc", "application/dssc+xml");
                _dict.Add("xdw", "application/vnd.fujixerox.docuworks");
                _dict.Add("xenc", "application/xenc+xml");
                _dict.Add("xer", "application/patch-ops-error+xml");
                _dict.Add("xfdf", "application/vnd.adobe.xfdf");
                _dict.Add("xfdl", "application/vnd.xfdl");
                _dict.Add("xht", "application/xhtml+xml");
                _dict.Add("xhtml", "application/xhtml+xml");
                _dict.Add("xhvml", "application/xv+xml");
                _dict.Add("xif", "image/vnd.xiff");
                _dict.Add("xla", "application/vnd.ms-excel");
                _dict.Add("xlam", "application/vnd.ms-excel.addin.macroenabled.12");
                _dict.Add("xlc", "application/vnd.ms-excel");
                _dict.Add("xlf", "application/x-xliff+xml");
                _dict.Add("xlm", "application/vnd.ms-excel");
                _dict.Add("xls", "application/vnd.ms-excel");
                _dict.Add("xlsb", "application/vnd.ms-excel.sheet.binary.macroenabled.12");
                _dict.Add("xlsm", "application/vnd.ms-excel.sheet.macroenabled.12");
                _dict.Add("xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
                _dict.Add("xlt", "application/vnd.ms-excel");
                _dict.Add("xltm", "application/vnd.ms-excel.template.macroenabled.12");
                _dict.Add("xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template");
                _dict.Add("xlw", "application/vnd.ms-excel");
                _dict.Add("xm", "audio/xm");
                _dict.Add("xml", "application/xml");
                _dict.Add("xo", "application/vnd.olpc-sugar");
                _dict.Add("xop", "application/xop+xml");
                _dict.Add("xpi", "application/x-xpinstall");
                _dict.Add("xpl", "application/xproc+xml");
                _dict.Add("xpm", "image/x-xpixmap");
                _dict.Add("xpr", "application/vnd.is-xpr");
                _dict.Add("xps", "application/vnd.ms-xpsdocument");
                _dict.Add("xpw", "application/vnd.intercon.formnet");
                _dict.Add("xpx", "application/vnd.intercon.formnet");
                _dict.Add("xsl", "application/xml");
                _dict.Add("xslt", "application/xslt+xml");
                _dict.Add("xsm", "application/vnd.syncml+xml");
                _dict.Add("xspf", "application/xspf+xml");
                _dict.Add("xul", "application/vnd.mozilla.xul+xml");
                _dict.Add("xvm", "application/xv+xml");
                _dict.Add("xvml", "application/xv+xml");
                _dict.Add("xwd", "image/x-xwindowdump");
                _dict.Add("xyz", "chemical/x-xyz");
                _dict.Add("xz", "application/x-xz");
                _dict.Add("yang", "application/yang");
                _dict.Add("yin", "application/yin+xml");
                _dict.Add("z1", "application/x-zmachine");
                _dict.Add("z2", "application/x-zmachine");
                _dict.Add("z3", "application/x-zmachine");
                _dict.Add("z4", "application/x-zmachine");
                _dict.Add("z5", "application/x-zmachine");
                _dict.Add("z6", "application/x-zmachine");
                _dict.Add("z7", "application/x-zmachine");
                _dict.Add("z8", "application/x-zmachine");
                _dict.Add("zaz", "application/vnd.zzazz.deck+xml");
                _dict.Add("zip", "application/zip");
                _dict.Add("zir", "application/vnd.zul");
                _dict.Add("zirz", "application/vnd.zul");
                _dict.Add("zmm", "application/vnd.handheld-entertainment+xml");
            }
            catch
            {
            }
        }
    }
}